﻿using MediatR;
using SqlSugar;
using T.Common.Domain.Common;

namespace RedDragon.ERP.API.Application.Commands.Purchases
{
    /// <summary>
    /// 添加采购/委外订单
    /// </summary>
    public class CreatePurchaseOutsourceCommand : IRequest<Result>
    {
        /// <summary>
        /// 序号
        /// </summary>
        public int PurchaseId { get; set; }

        /// <summary>
        /// 订单编码
        /// </summary>
        public string PurchaseNumber { get; set; }

        /// <summary>
        /// 订单名称
        /// </summary>
        public string PurchaseName { get; set; }

        /// <summary>
        /// 订单类型(外键)
        /// </summary>
        public int PurchaseTypeId { get; set; }

        /// <summary>
        /// 所属项目(外键)
        /// </summary>
        public int AffiliatedProjectId { get; set; }

        /// <summary>
        /// 协议编码
        /// </summary>
        public string ProtocolCoding { get; set; }

        /// <summary>
        /// 协议名称
        /// </summary>
        public string ProtocolName { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        public string PurchaseNote { get; set; }

        /// <summary>
        /// 供应商(外键)
        /// </summary>
        public int SupplierId { get; set; }

        /// <summary>
        /// 币种(外键)
        /// </summary>
        public int CurrencyId { get; set; }

        /// <summary>
        /// 预付款金额
        /// </summary>
        public decimal PaymentAmount { get; set; }

        /// <summary>
        /// 订单开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 订单结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 签订时间
        /// </summary>
        public DateTime? TheDateOfSigning { get; set; }

        /// <summary>
        /// 状态 1-新建 2-确认
        /// </summary>
        public int PurchaseStatus { get; set; }

        /// <summary>
        /// 计税类型
        /// </summary>
        public string TaxType { get; set; }

        /// <summary>
        /// 税率
        /// </summary>
        public decimal TaxRate { get; set; }

        /// <summary>
        /// 制单人
        /// </summary>
        public string PreparedBy { get; set; }

        /// <summary>
        /// 制单部门(外键)
        /// </summary>
        public int DepartmentId { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreatedOwner { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        public string? ExamineOwner { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ExamineTime { get; set; }
    }
}
